#!/usr/bin/env python

##  flamingo - 2D Game Engine
##  Copyright (C) 2009 Bradley Zeis
##
##  This program is free software: you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation, either version 3 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License for more details.
##
##  You should have received a copy of the GNU General Public License
##  along with this program.  If not, see <http://www.gnu.org/licenses/>.
##
##  Bradley Zeis
##  flamingoengine@gmail.com

"""Empty mixer for use when regular mixers aren't available."""

THREADED = True

def init(*args):
    pass

def start():
    pass

def quit():
    pass

def ms_to_samp(ms):
    return int(ms * (SAMPLERATE / 1000.0))

def samp_to_ms(samp):
    return int(samp / (SAMPLERATE / 1000.0))

class Sound(object):
    def __init__(*args, **kwargs):
        pass

    def play(*args, **kwargs):
        return SoundEvent()

    def resample(self, samplerate):
        pass

    def __getattr__(self, *args):
        return None

class StreamingSound(object):
    def __init__(*args, **kwargs):
        pass

    def play(*args, **kwargs):
        return SoundEvent()

    def __getattr__(self, *args):
        return None

class SoundEvent(object):
    def __getattr__(self, *args):
        return None

    def pause(self):
        pass

    def unpause(self):
        pass

    def stop(self):
        pass

class Mixer(object):
    def __init__(*args, **kwargs):
        pass

    @classmethod
    def tick(*args):
        pass
